Skip to content

[Custom scalars] Implement scalar option in field policies with cache reads - #13258

Closed
jerelmiller wants to merge 32 commits into
jerel/custom-scalar-configfrom
jerel/type-policy-config
Closed

[Custom scalars] Implement scalar option in field policies with cache reads#13258
jerelmiller wants to merge 32 commits into
jerel/custom-scalar-configfrom
jerel/type-policy-config

Conversation

@jerelmiller

Copy link
Copy Markdown
Member

Part of the custom scalars work: #13227

Adds the scalar option for field policies so that fields can specify which scalar to use. This change also implements scalar parsing for cache reads so that cache.readQuery, cache.readFragment, and cache.watchFragment all return the parsed scalar values for fields that specify a scalar.

@apollo-librarian

apollo-librarian Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 3 changed, 0 removed
* (developer-tools)/react/(latest)/data/fragments.mdx
* (developer-tools)/react/(latest)/data/typescript.mdx
* (developer-tools)/react/(latest)/migrating/apollo-client-4-migration.mdx

Build ID: 43878d757ec32f261464ed6b
Build Logs: View logs

URL: https://www.apollographql.com/docs/deploy-preview/43878d757ec32f261464ed6b


✅ AI Style Review — No Changes Detected

No MDX files were changed in this pull request.

Review Log: View detailed log

This review is AI-generated. Please use common sense when accepting these suggestions, as they may not always be accurate or appropriate for your specific context.

@jerelmiller
jerelmiller requested a review from phryneas June 4, 2026 06:01
@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • release-*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 1eee4b2d-410f-489e-85ed-bd086510760b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@changeset-bot

changeset-bot Bot commented Jun 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1ed51e1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@apollo/client Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jun 4, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/apollographql/apollo-client/@apollo/client@13258

commit: 1ed51e1

@jerelmiller jerelmiller changed the title Implement scalar option in field policies with cache reads [Custom Scalars] Implement scalar option in field policies with cache reads Jun 5, 2026
@jerelmiller jerelmiller changed the title [Custom Scalars] Implement scalar option in field policies with cache reads [Custom scalars] Implement scalar option in field policies with cache reads Jun 5, 2026
@jerelmiller

Copy link
Copy Markdown
Member Author

Closing in favor of #13259 which incorporates these changes along with cache writes. We are going to change cache writes to store the parsed value rather than the serialized value which negates some of the changes in this PR, so it will be combined for better clarity.

@jerelmiller jerelmiller closed this Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant